package accountManagement;

public class Client extends Account {
	private static final long serialVersionUID = 2219844348689927548L;
	private String surname;
	private String name;
	private String fiscalCode;
	
	public Client() {
		super();
	}
	
	public Client(String nickname, String password, String surname, String name, String fiscalCode) {
		super(nickname, password);
		this.setSurname(surname);
		this.setName(name);
		this.setFiscalCode(fiscalCode);
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFiscalCode() {
		return fiscalCode.toUpperCase();
	}

	public void setFiscalCode(String fiscalCode) {
		this.fiscalCode = fiscalCode;
	}
	
	@Override
	public boolean equals(Object object) {
		return object != null && object instanceof Client && super.equals((Client)object);
	}
	
	@Override
	public String toString() {
		return "Cliente[" + super.toString() + 
				";Surname:" + getSurname() + 
				";Name:" + getName() + 
				";FiscalCode:" + getFiscalCode() + 
				"]";
	}
}
